package org.whale.springcloud.eureka.user.server.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.whale.springcloud.eureka.common.entity.JsonResponse;

import java.util.Map;

@RestController
@RequestMapping("/userServer")
public class UserController {

  private static final Logger logger = LoggerFactory.getLogger(UserController.class);

  @RequestMapping("/queryUserInfo")
  public JsonResponse<String> queryUserInfo(@RequestParam Map<String, String> params) {

    logger.info("server start calling ");
    logger.info("params:" + params.toString());

    String clientName = params.get("clientName");

    return JsonResponse.success("query user info success,client:" + clientName, "success");
  }
}
